{extend name="layouts/default" /}
{block name="title"}用户注册{/block}
{block name="content"}
<div class="row">
    <div class="offset-md-2 col-md-8">
        <div class="card">
            <div class="card-header h3 text-center">
                <i class="fa fa-address-book text-success"></i>&nbsp;新用户注册
            </div>
            <div class="card-body">
                {include file="shared/_errors" /}
                <form method="post" action="{:url('User/save')}">
                    {:token_field()}
                    <div class="mb-3">
                        <label for="name" class="form-label">名称:</label>
                        <input type="text" required maxlength="255" value="{:session('old.name')}"
                               class="form-control" placeholder="请输入您的名称" id="name" name="name">
                    </div>
                    <div class="mb-3">
                        <label for="email" class="form-label">邮箱:</label>
                        <input type="email" required maxlength="255" value="{:session('old.email')}"
                               class="form-control" placeholder="请输入您的邮箱" id="email" name="email">
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label">密码:</label>
                        <input type="password" required minlength="6" maxlength="255"
                               class="form-control" placeholder="请输入您的密码" id="password" name="password">
                    </div>
                    <div class="mb-3">
                        <label for="password_confirm" class="form-label">密码确认:</label>
                        <input type="password" required minlength="6" maxlength="255"
                               class="form-control" placeholder="密码确认" id="password_confirm" name="password_confirm">
                    </div>
                    <div class="d-flex justify-content-center">
                        <button type="submit" class="btn btn-primary">注册</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

{/block}